﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdDbBaseFullSubentPath : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbBaseFullSubentPath(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbBaseFullSubentPath obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbBaseFullSubentPath()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdDbBaseFullSubentPath(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdDbBaseFullSubentPath() : this(GlobalsPINVOKE.new_OdDbBaseFullSubentPath__SWIG_0(), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbBaseFullSubentPath(SubentType type, IntPtr index) : this(GlobalsPINVOKE.new_OdDbBaseFullSubentPath__SWIG_1((int)type, index), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbBaseFullSubentPath(OdDbStub entId, OdDbSubentId subId) : this(GlobalsPINVOKE.new_OdDbBaseFullSubentPath__SWIG_2(OdDbStub.getCPtr(entId), OdDbSubentId.getCPtr(subId)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbBaseFullSubentPath(OdDbStub entId, SubentType type, IntPtr index) : this(GlobalsPINVOKE.new_OdDbBaseFullSubentPath__SWIG_3(OdDbStub.getCPtr(entId), (int)type, index), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbBaseFullSubentPath(OdDbStubPtrArray objectIds, OdDbSubentId subId) : this(GlobalsPINVOKE.new_OdDbBaseFullSubentPath__SWIG_4(OdDbStubPtrArray.getCPtr(objectIds), OdDbSubentId.getCPtr(subId)), true)
		{
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void objectIds(OdDbStubPtrArray objectIdsArg)
		{
			GlobalsPINVOKE.OdDbBaseFullSubentPath_objectIds__SWIG_0(this.swigCPtr, OdDbStubPtrArray.getCPtr(objectIdsArg));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdDbBaseFullSubentPath Assign(OdDbBaseFullSubentPath fullSubentPath)
		{
			OdDbBaseFullSubentPath result = new OdDbBaseFullSubentPath(GlobalsPINVOKE.OdDbBaseFullSubentPath_Assign(this.swigCPtr, OdDbBaseFullSubentPath.getCPtr(fullSubentPath)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsEqual(OdDbBaseFullSubentPath fullSubentPath)
		{
			bool result = GlobalsPINVOKE.OdDbBaseFullSubentPath_IsEqual(this.swigCPtr, OdDbBaseFullSubentPath.getCPtr(fullSubentPath));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbStubPtrArray objectIds()
		{
			OdDbStubPtrArray result = new OdDbStubPtrArray(GlobalsPINVOKE.OdDbBaseFullSubentPath_objectIds__SWIG_1(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbSubentId subentId()
		{
			OdDbSubentId result = new OdDbSubentId(GlobalsPINVOKE.OdDbBaseFullSubentPath_subentId__SWIG_0(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
